<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Associative array</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Associative_array"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Associative_array rootpage-Associative_array skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Associative array</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">"Dictionary (data structure)" redirects here; not to be confused with <a href="Data_dictionary" title="Data dictionary">data dictionary</a>.</div>
<div role="note" class="hatnote navigation-not-searchable">"Associative container" redirects here. For their C++ implementation, see <a href="Associative_containers_(C%2B%2B)" title="Associative containers (C++)">associative containers (C++)</a>.</div>
<div role="note" class="hatnote navigation-not-searchable">"Map (computer science)" redirects here. For the higher-order function, see <a href="Map_(higher-order_function)" title="Map (higher-order function)">Map (higher-order function)</a>.</div>
<div role="note" class="hatnote navigation-not-searchable">"Associative table" redirects here. For the relation used in database systems to resolve many-to-many relationship, see <a href="Associative_entity" title="Associative entity">Associative entity</a>.</div>
<p>In <a href="Computer_science" title="Computer science">computer science</a>, an <b>associative array</b>, <b>key-value store</b>, <b>map</b>, <b>symbol table</b>, or <b>dictionary</b> is an <a href="Abstract_data_type" title="Abstract data type">abstract data type</a> that stores a <a href="Collection_(abstract_data_type)" title="Collection (abstract data type)">collection</a> of <a href="Attribute%E2%80%93value_pair" class="mw-redirect" title="Attribute–value pair">(key, value) pairs</a>, such that each possible key appears at most once in the collection. In mathematical terms, an associative array is a <a href="Function_(mathematics)" title="Function (mathematics)">function</a> with <i>finite</i> <a href="Domain_of_a_function" title="Domain of a function">domain</a>.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> It supports 'lookup', 'remove', and 'insert' operations.
</p><p>The <b>dictionary problem</b> is the classic problem of designing efficient <a href="Data_structure" title="Data structure">data structures</a> that implement associative arrays.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
The two major solutions to the dictionary problem are <a href="Hash_table" title="Hash table">hash tables</a> and <a href="Search_tree" title="Search tree">search trees</a>.<sup id="cite_ref-gt_3-0" class="reference"><a href="#cite_note-gt-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ms_4-0" class="reference"><a href="#cite_note-ms-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-clrs_5-0" class="reference"><a href="#cite_note-clrs-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-dietzfelbinger_6-0" class="reference"><a href="#cite_note-dietzfelbinger-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
It is sometimes also possible to solve the problem using directly addressed <a href="Array_data_structure" class="mw-redirect" title="Array data structure">arrays</a>, <a href="Binary_search_tree" title="Binary search tree">binary search trees</a>, or other more specialized structures.
</p><p>Many programming languages include associative arrays as <a href="Primitive_data_type" title="Primitive data type">primitive data types</a>, while many other languages provide <a href="Software_library" class="mw-redirect" title="Software library">software libraries</a> that support associative arrays. <a href="Content-addressable_memory" title="Content-addressable memory">Content-addressable memory</a> is a form of direct hardware-level support for associative arrays.
</p><p>Associative arrays have many applications including such fundamental <a href="Software_design_pattern" title="Software design pattern">programming patterns</a> as <a href="Memoization" title="Memoization">memoization</a><sup id="cite_ref-Michie1968_7-0" class="reference"><a href="#cite_note-Michie1968-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> and the <a href="Decorator_pattern" title="Decorator pattern">decorator pattern</a>.<sup id="cite_ref-decorator_8-0" class="reference"><a href="#cite_note-decorator-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
The name does not come from the <a href="Associative_property" title="Associative property">associative property</a> known in mathematics. Rather, it arises from the association of values with keys. It is not to be confused with <a href="Flynn's_taxonomy#Associative_processor" title="Flynn's taxonomy">associative processors</a>.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Operations">Operations</h2></div>
<p>In an associative array, the association between <a href="Attribute%E2%80%93value_pair" class="mw-redirect" title="Attribute–value pair">a key and a value</a> is often known as a "mapping"; the same word may also be used to refer to the process of creating a new association.
</p><p>The operations that are usually defined for an associative array are:<sup id="cite_ref-gt_3-1" class="reference"><a href="#cite_note-gt-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ms_4-1" class="reference"><a href="#cite_note-ms-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Black_9-0" class="reference"><a href="#cite_note-Black-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<dl><dt>Insert or put</dt>
<dd>add a new <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (key,value)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>k</mi>
<mi>e</mi>
<mi>y</mi>
<mo>,</mo>
<mi>v</mi>
<mi>a</mi>
<mi>l</mi>
<mi>u</mi>
<mi>e</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (key,value)}</annotation>
</semantics>
</math></span><img src="./2362d80ab2b2e3530f179bd081a2af7e0aa936b7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.757ex; height:2.843ex;" alt="{\displaystyle (key,value)}" loading="lazy"></span> pair to the collection, mapping the key to its new value. Any existing mapping is overwritten. The arguments to this operation are the key and the value.</dd>
<dt>Remove or delete</dt>
<dd>remove a <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (key,value)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>k</mi>
<mi>e</mi>
<mi>y</mi>
<mo>,</mo>
<mi>v</mi>
<mi>a</mi>
<mi>l</mi>
<mi>u</mi>
<mi>e</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (key,value)}</annotation>
</semantics>
</math></span><img src="./2362d80ab2b2e3530f179bd081a2af7e0aa936b7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.757ex; height:2.843ex;" alt="{\displaystyle (key,value)}" loading="lazy"></span> pair from the collection, unmapping a given key from its value. The argument to this operation is the key.</dd>
<dt>Lookup, find, or get</dt>
<dd>find the value (if any) that is bound to a given key. The argument to this operation is the key, and the value is returned from the operation. If no value is found, some lookup functions raise an <a href="Exception_handling" title="Exception handling">exception</a>, while others return a default value (such as zero, null, or a specific value passed to the constructor).</dd></dl>
<p>Associative arrays may also include other operations such as determining the number of mappings or constructing an <a href="Iterator" title="Iterator">iterator</a> to loop over all the mappings. For such operations, the order in which the mappings are returned is usually implementation-defined.
</p><p>A <a href="Multimap" title="Multimap">multimap</a> generalizes an associative array by allowing multiple values to be associated with a single key.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> A <a href="Bidirectional_map" title="Bidirectional map">bidirectional map</a> is a related abstract data type in which the mappings operate in both directions: each value must be associated with a unique key, and a second lookup operation takes a value as an argument and looks up the key associated with that value.
</p>
<div class="mw-heading mw-heading3"><h3 id="Properties">Properties</h3></div>
<p>The operations of the associative array should satisfy various properties:<sup id="cite_ref-Black_9-1" class="reference"><a href="#cite_note-Black-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li><code>lookup(k, insert(j, v, D)) = if k == j then v else lookup(k, D)</code></li>
<li><code>lookup(k, new()) = fail</code>, where <code>fail</code> is an exception or default value</li>
<li><code>remove(k, insert(j, v, D)) = if k == j then remove(k, D) else insert(j, v, remove(k, D))</code></li>
<li><code>remove(k, new()) = new()</code></li></ul>
<p>where <code>k</code> and <code>j</code> are keys, <code>v</code> is a value, <code>D</code> is an associative array, and <code>new()</code> creates a new, empty associative array.
</p>
<div class="mw-heading mw-heading3"><h3 id="Example">Example</h3></div>
<p>Suppose that the set of loans made by a library is represented in a data structure. Each book in a library may be checked out by one patron at a time. However, a single patron may be able to check out multiple books. Therefore, the information about which books are checked out to which patrons may be represented by an associative array, in which the books are the keys and the patrons are the values. Using notation from <a href="Python_(programming_language)" title="Python (programming language)">Python</a> or <a href="JSON" title="JSON">JSON</a>, the data structure would be:
</p>
<div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span class="p">{</span>
<span class="w"> </span><span class="s2">"Pride and Prejudice"</span><span class="o">:</span><span class="w"> </span><span class="s2">"Alice"</span><span class="p">,</span>
<span class="w"> </span><span class="s2">"Wuthering Heights"</span><span class="o">:</span><span class="w"> </span><span class="s2">"Alice"</span><span class="p">,</span>
<span class="w"> </span><span class="s2">"Great Expectations"</span><span class="o">:</span><span class="w"> </span><span class="s2">"John"</span>
<span class="p">}</span>
</pre></div>
<p>A lookup operation on the key "Great Expectations" would return "John". If John returns his book, that would cause a deletion operation, and if Pat checks out a book, that would cause an insertion operation, leading to a different state:
</p>
<div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span class="p">{</span>
<span class="w"> </span><span class="s2">"Pride and Prejudice"</span><span class="o">:</span><span class="w"> </span><span class="s2">"Alice"</span><span class="p">,</span>
<span class="w"> </span><span class="s2">"The Brothers Karamazov"</span><span class="o">:</span><span class="w"> </span><span class="s2">"Pat"</span><span class="p">,</span>
<span class="w"> </span><span class="s2">"Wuthering Heights"</span><span class="o">:</span><span class="w"> </span><span class="s2">"Alice"</span>
<span class="p">}</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="Implementation">Implementation</h2></div>
<p>For dictionaries with very few mappings, it may make sense to implement the dictionary using an <a href="Association_list" title="Association list">association list</a>, which is a <a href="Linked_list" title="Linked list">linked list</a> of mappings. With this implementation, the time to perform the basic dictionary operations is linear in the total number of mappings. However, it is easy to implement and the constant factors in its running time are small.<sup id="cite_ref-gt_3-2" class="reference"><a href="#cite_note-gt-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p><p>Another very simple implementation technique, usable when the keys are restricted to a narrow range, is direct addressing into an array: the value for a given key <i>k</i> is stored at the array cell <i>A</i>[<i>k</i>], or if there is no mapping for <i>k</i> then the cell stores a special <a href="Sentinel_value" title="Sentinel value">sentinel value</a> that indicates the lack of a mapping. This technique is simple and fast, with each dictionary operation taking constant time. However, the space requirement for this structure is the size of the entire keyspace, making it impractical unless the keyspace is small.<sup id="cite_ref-clrs_5-1" class="reference"><a href="#cite_note-clrs-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p><p>The two major approaches for implementing dictionaries are a <a href="Hash_table" title="Hash table">hash table</a> or a <a href="Search_tree" title="Search tree">search tree</a>.<sup id="cite_ref-gt_3-3" class="reference"><a href="#cite_note-gt-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ms_4-2" class="reference"><a href="#cite_note-ms-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-clrs_5-2" class="reference"><a href="#cite_note-clrs-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-dietzfelbinger_6-1" class="reference"><a href="#cite_note-dietzfelbinger-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Hash_table_implementations">Hash table implementations</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Hash_table" title="Hash table">Hash table</a></div>
<p>The most frequently used general-purpose implementation of an associative array is with a <a href="Hash_table" title="Hash table">hash table</a>: an <a href="Array_data_structure" class="mw-redirect" title="Array data structure">array</a> combined with a <a href="Hash_function" title="Hash function">hash function</a> that separates each key into a separate "bucket" of the array. The basic idea behind a hash table is that accessing an element of an array via its index is a simple, constant-time operation. Therefore, the average overhead of an operation for a hash table is only the computation of the key's hash, combined with accessing the corresponding bucket within the array. As such, hash tables usually perform in O(1) time, and usually outperform alternative implementations.
</p><p>Hash tables must be able to handle <a href="Hash_collision" title="Hash collision">collisions</a>: the mapping by the hash function of two different keys to the same bucket of the array. The two most widespread approaches to this problem are <a href="Separate_chaining" class="mw-redirect" title="Separate chaining">separate chaining</a> and <a href="Open_addressing" title="Open addressing">open addressing</a>.<sup id="cite_ref-gt_3-4" class="reference"><a href="#cite_note-gt-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-ms_4-3" class="reference"><a href="#cite_note-ms-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-clrs_5-3" class="reference"><a href="#cite_note-clrs-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-fklm_12-0" class="reference"><a href="#cite_note-fklm-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> In separate chaining, the array does not store the value itself but stores a <a href="Pointer_(computer_programming)" title="Pointer (computer programming)">pointer</a> to another container, usually an <a href="Association_list" title="Association list">association list</a>, that stores all the values matching the hash. By contrast, in open addressing, if a hash collision is found, the table seeks an empty spot in an array to store the value in a deterministic manner, usually by looking at the next immediate position in the array.
</p><p>Open addressing has a lower <a href="Cache_miss" class="mw-redirect" title="Cache miss">cache miss</a> ratio than separate chaining when the table is mostly empty. However, as the table becomes filled with more elements, open addressing's performance degrades exponentially. Additionally, separate chaining uses less memory in most cases, unless the entries are very small (less than four times the size of a pointer).
</p>
<div class="mw-heading mw-heading3"><h3 id="Tree_implementations">Tree implementations</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Search_tree" title="Search tree">Search tree</a></div>
<div class="mw-heading mw-heading4"><h4 id="Self-balancing_binary_search_trees">Self-balancing binary search trees</h4></div>
<p>Another common approach is to implement an associative array with a <a href="Self-balancing_binary_search_tree" title="Self-balancing binary search tree">self-balancing binary search tree</a>, such as an <a href="AVL_tree" title="AVL tree">AVL tree</a> or a <a href="Red%E2%80%93black_tree" title="Red–black tree">red–black tree</a>.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup>
</p><p>Compared to hash tables, these structures have both strengths and weaknesses. The worst-case performance of self-balancing binary search trees is significantly better than that of a hash table, with a time complexity in <a href="Big_O_notation" title="Big O notation">big O notation</a> of O(log <i>n</i>). This is in contrast to hash tables, whose worst-case performance involves all elements sharing a single bucket, resulting in O(<i>n</i>) time complexity. In addition, and like all binary search trees, self-balancing binary search trees keep their elements in order. Thus, traversing its elements follows a least-to-greatest pattern, whereas traversing a hash table can result in elements being in seemingly random order. Because they are in order, tree-based maps can also satisfy range queries (find all values between two bounds) whereas a hashmap can only find exact values. However, hash tables have a much better average-case time complexity than self-balancing binary search trees of O(1), and their worst-case performance is highly unlikely when a good <a href="Hash_function" title="Hash function">hash function</a> is used.
</p><p>A self-balancing binary search tree can be used to implement the buckets for a hash table that uses separate chaining. This allows for average-case constant lookup, but assures a worst-case performance of O(log <i>n</i>). However, this introduces extra complexity into the implementation and may cause even worse performance for smaller hash tables, where the time spent inserting into and balancing the tree is greater than the time needed to perform a <a href="Linear_search" title="Linear search">linear search</a> on all elements of a linked list or similar data structure.<sup id="cite_ref-knuth_14-0" class="reference"><a href="#cite_note-knuth-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading4"><h4 id="Other_trees">Other trees</h4></div>
<p>Associative arrays may also be stored in unbalanced <a href="Binary_search_tree" title="Binary search tree">binary search trees</a> or in data structures specialized to a particular type of keys such as <a href="Radix_tree" title="Radix tree">radix trees</a>, <a href="Trie" title="Trie">tries</a>, <a href="Judy_array" title="Judy array">Judy arrays</a>, or <a href="Van_Emde_Boas_tree" title="Van Emde Boas tree">van Emde Boas trees</a>, though the relative performance of these implementations varies. For instance, Judy trees have been found to perform less efficiently than hash tables, while carefully selected hash tables generally perform more efficiently than adaptive radix trees, with potentially greater restrictions on the data types they can handle.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> The advantages of these alternative structures come from their ability to handle additional associative array operations, such as finding the mapping whose key is the closest to a queried key when the query is absent in the set of mappings.
</p>
<div class="mw-heading mw-heading3"><h3 id="Comparison">Comparison</h3></div>
<table class="wikitable">
<tbody><tr>
<th rowspan="2">Underlying data structure
</th>
<th colspan="2">Lookup or Removal
</th>
<th colspan="2">Insertion
</th>
<th rowspan="2">Ordered
</th></tr>
<tr>
<th>average
</th>
<th>worst case
</th>
<th>average
</th>
<th>worst case
</th></tr>
<tr>
<th><a href="Hash_table" title="Hash table">Hash table</a>
</th>
<td style="background:#ddffdd">O(1)
</td>
<td style="background:#ffdddd">O(<i>n</i>)
</td>
<td style="background:#ddffdd">O(1)
</td>
<td style="background:#ffdddd">O(<i>n</i>)
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no">No
</td></tr>
<tr>
<th><a href="Self-balancing_binary_search_tree" title="Self-balancing binary search tree">Self-balancing binary search tree</a>
</th>
<td style="background:#ffffdd">O(log <i>n</i>)
</td>
<td style="background:#ffffdd">O(log <i>n</i>)
</td>
<td style="background:#ffffdd">O(log <i>n</i>)
</td>
<td style="background:#ffffdd">O(log <i>n</i>)
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes">Yes
</td></tr>
<tr>
<th>unbalanced <a href="Binary_search_tree" title="Binary search tree">binary search tree</a>
</th>
<td style="background:#ffffdd">O(log <i>n</i>)
</td>
<td style="background:#ffdddd">O(<i>n</i>)
</td>
<td style="background:#ffffdd">O(log <i>n</i>)
</td>
<td style="background:#ffdddd">O(<i>n</i>)
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes">Yes
</td></tr>
<tr>
<th>Sequential container of <a href="Attribute%E2%80%93value_pair" class="mw-redirect" title="Attribute–value pair">key–value pairs</a><br>(e.g. <a href="Association_list" title="Association list">association list</a>)
</th>
<td style="background:#ffdddd">O(<i>n</i>)
</td>
<td style="background:#ffdddd">O(<i>n</i>)
</td>
<td style="background:#ddffdd">O(1)
</td>
<td style="background:#ddffdd">O(1)
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no">No
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Ordered_dictionary">Ordered dictionary</h2></div>
<p>The basic definition of a dictionary does not mandate an order. To guarantee a fixed order of enumeration, ordered versions of the associative array are often used. There are two senses of an ordered dictionary:
</p>
<ul><li>The order of enumeration is always deterministic for a given set of keys by sorting. This is the case for tree-based implementations, one representative being the <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr"><map></code> container of C++.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup></li>
<li>The order of enumeration is key-independent and is instead based on the order of insertion. This is the case for the "ordered dictionary" in <a href=".NET_Framework" title=".NET Framework">.NET Framework</a>, the LinkedHashMap of <a href="Java_(programming_language)" title="Java (programming language)">Java</a> and <a href="Python_(programming_language)" title="Python (programming language)">Python</a>.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup></li></ul>
<p>The latter is more common. Such ordered dictionaries can be implemented using an <a href="Association_list" title="Association list">association list</a>, by overlaying a <a href="Doubly_linked_list" title="Doubly linked list">doubly linked list</a> on top of a normal dictionary, or by moving the actual data out of the sparse (unordered) array and into a dense insertion-ordered one.
</p>
<div class="mw-heading mw-heading2"><h2 id="Language_support">Language support</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Comparison_of_programming_languages_(associative_array)" title="Comparison of programming languages (associative array)">Comparison of programming languages (associative array)</a></div>
<p>Associative arrays can be implemented in any programming language as a package and many language systems provide them as part of their standard library. In some languages, they are not only built into the standard system, but have special syntax, often using array-like subscripting.
</p><p>Built-in syntactic support for associative arrays was introduced in 1969 by <a href="SNOBOL" title="SNOBOL">SNOBOL4</a>, under the name "table". <a href="TMG_(language)" title="TMG (language)">TMG</a> offered tables with string keys and integer values. <a href="MUMPS" title="MUMPS">MUMPS</a> made multi-dimensional associative arrays, optionally persistent, its key data structure. <a href="SETL" title="SETL">SETL</a> supported them as one possible implementation of sets and maps. Most modern scripting languages, starting with <a href="AWK" title="AWK">AWK</a> and including <a href="Rexx" title="Rexx">Rexx</a>, <a href="Perl" title="Perl">Perl</a>, <a href="PHP" title="PHP">PHP</a>, <a href="Tcl" title="Tcl">Tcl</a>, <a href="JavaScript" title="JavaScript">JavaScript</a>, <a href="Maple_(software)" title="Maple (software)">Maple</a>, <a href="Python_(programming_language)" title="Python (programming language)">Python</a>, <a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a>, <a href="Wolfram_Language" title="Wolfram Language">Wolfram Language</a>, <a href="Go_(programming_language)" title="Go (programming language)">Go</a>, and <a href="Lua_(programming_language)" class="mw-redirect" title="Lua (programming language)">Lua</a>, support associative arrays as a primary container type. In many more languages, they are available as library functions without special syntax.
</p><p>In <a href="Smalltalk" title="Smalltalk">Smalltalk</a>, <a href="Objective-C" title="Objective-C">Objective-C</a>, <a href=".NET_Framework" title=".NET Framework">.NET</a>,<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> <a href="Python_(programming_language)" title="Python (programming language)">Python</a>, <a href="REALbasic" class="mw-redirect" title="REALbasic">REALbasic</a>, <a href="Swift_(programming_language)" title="Swift (programming language)">Swift</a>, <a href="Visual_Basic_for_Applications" title="Visual Basic for Applications">VBA</a> and <a href="Delphi_(programming_language)" class="mw-redirect" title="Delphi (programming language)">Delphi</a><sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup> they are called <i>dictionaries</i>; in <a href="Perl" title="Perl">Perl</a>, <a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a> and <a href="Seed7" title="Seed7">Seed7</a> they are called <i>hashes</i>; in <a href="C%2B%2B" title="C++">C++</a>, <a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a>, <a href="Java_(programming_language)" title="Java (programming language)">Java</a>, <a href="Go_(programming_language)" title="Go (programming language)">Go</a>, <a href="Clojure" title="Clojure">Clojure</a>, <a href="Scala_(programming_language)" title="Scala (programming language)">Scala</a>, <a href="OCaml" title="OCaml">OCaml</a>, <a href="Haskell_(programming_language)" class="mw-redirect" title="Haskell (programming language)">Haskell</a> they are called <i>maps</i> (see <a href="Map_(C%2B%2B)" class="mw-redirect" title="Map (C++)">map (C++)</a>, <a href="Unordered_map_(C%2B%2B)" class="mw-redirect" title="Unordered map (C++)">unordered_map (C++)</a>, and <code><a rel="nofollow" class="external text" href="https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/util/Map.html">Map</a></code>); in <a href="Common_Lisp" title="Common Lisp">Common Lisp</a> and <a href="Windows_PowerShell" class="mw-redirect" title="Windows PowerShell">Windows PowerShell</a>, they are called <i>hash tables</i> (since both typically use this implementation); in <a href="Maple_(software)" title="Maple (software)">Maple</a> and Lua, they are called <i>tables</i>. In <a href="PHP" title="PHP">PHP</a> and <a href="R_(programming_language)" title="R (programming language)">R</a>, all arrays can be associative, except that the keys are limited to integers and strings. In JavaScript (see also <a href="JSON" title="JSON">JSON</a>), all objects behave as associative arrays with string-valued keys, while the Map and WeakMap types take arbitrary objects as keys. In Lua, they are used as the primitive building block for all data structures. In <a href="Visual_FoxPro" title="Visual FoxPro">Visual FoxPro</a>, they are called <i>Collections</i>. The <a href="D_(programming_language)" title="D (programming language)">D language</a> also supports associative arrays.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Permanent_storage">Permanent storage</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Key%E2%80%93value_store" class="mw-redirect" title="Key–value store">Key–value store</a></div>
<p>Many programs using associative arrays will need to store that data in a more permanent form, such as a <a href="Computer_file" title="Computer file">computer file</a>. A common solution to this problem is a generalized concept known as <i>archiving</i> or <i><a href="Serialization" title="Serialization">serialization</a></i>, which produces a text or binary representation of the original objects that can be written directly to a file. This is most commonly implemented in the underlying object model, like .Net or Cocoa, which includes standard functions that convert the internal data into text. The program can create a complete text representation of any group of objects by calling these methods, which are almost always already implemented in the base associative array class.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</p><p>For programs that use very large data sets, this sort of individual file storage is not appropriate, and a <a href="Database_management_system" class="mw-redirect" title="Database management system">database management system</a> (DB) is required. Some DB systems natively store associative arrays by serializing the data and then storing that serialized data and the key. Individual arrays can then be loaded or saved from the database using the key to refer to them. These <a href="Key%E2%80%93value_database" title="Key–value database">key–value stores</a> have been used for many years and have a history as long as that of the more common <a href="Relational_database" title="Relational database">relational database</a> (RDBs), but a lack of standardization, among other reasons, limited their use to certain niche roles. RDBs were used for these roles in most cases, although saving objects to a RDB can be complicated, a problem known as <a href="Object-relational_impedance_mismatch" class="mw-redirect" title="Object-relational impedance mismatch">object-relational impedance mismatch</a>.
</p><p>After approximately 2010, the need for high-performance databases suitable for <a href="Cloud_computing" title="Cloud computing">cloud computing</a> and more closely matching the internal structure of the programs using them led to a renaissance in the key–value store market. These systems can store and retrieve associative arrays in a native fashion, which can greatly improve performance in common web-related workflows.
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1266661725">
/* start https://en.wikipedia.org/ */
.mw-parser-output .portalbox{padding:0;margin:0.5em 0;display:table;box-sizing:border-box;max-width:175px;list-style:none}.mw-parser-output .portalborder{border:1px solid var(--border-color-base,#a2a9b1);padding:0.1em;background:var(--background-color-neutral-subtle,#f8f9fa)}.mw-parser-output .portalbox-entry{display:table-row;font-size:85%;line-height:110%;height:1.9em;font-style:italic;font-weight:bold}.mw-parser-output .portalbox-image{display:table-cell;padding:0.2em;vertical-align:middle;text-align:center}.mw-parser-output .portalbox-link{display:table-cell;padding:0.2em 0.2em 0.2em 0.3em;vertical-align:middle}@media(min-width:720px){.mw-parser-output .portalleft{margin:0.5em 1em 0.5em 0}.mw-parser-output .portalright{clear:right;float:right;margin:0.5em 0 0.5em 1em}}
/* end https://en.wikipedia.org/ */
</style>
<ul><li><a href="Tuple" title="Tuple">Tuple</a></li>
<li><a href="Function_(mathematics)" title="Function (mathematics)">Function (mathematics)</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFCollinsSyme1995" class="citation book cs1">Collins, Graham; Syme, Donald (1995). "A theory of finite maps". <i>Higher Order Logic Theorem Proving and Its Applications</i>. Lecture Notes in Computer Science. Vol. 971. pp. <span class="nowrap">122–</span>137. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F3-540-60275-5_61">10.1007/3-540-60275-5_61</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-3-540-60275-0</bdi>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite id="CITEREFAndersson1989" class="citation book cs1">Andersson, Arne (1989). "Optimal Bounds on the Dictionary Problem". <i>Proc. Symposium on Optimal Algorithms</i>. Lecture Notes in Computer Science. Vol. 401. Springer Verlag. pp. <span class="nowrap">106–</span>114. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F3-540-51859-2_10">10.1007/3-540-51859-2_10</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-3-540-51859-4</bdi>.</cite></span>
</li>
<li id="cite_note-gt-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-gt_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-gt_3-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-gt_3-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-gt_3-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-gt_3-4"><sup><i><b>e</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGoodrichTamassia2006" class="citation cs2"><a href="Michael_T._Goodrich" title="Michael T. Goodrich">Goodrich, Michael T.</a>; <a href="Roberto_Tamassia" title="Roberto Tamassia">Tamassia, Roberto</a> (2006), "9.1 The Map Abstract Data Type", <i>Data Structures & Algorithms in Java</i> (4th ed.), Wiley, pp. <span class="nowrap">368–</span>371</cite></span>
</li>
<li id="cite_note-ms-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-ms_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-ms_4-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-ms_4-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-ms_4-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFMehlhornSanders2008" class="citation cs2"><a href="Kurt_Mehlhorn" title="Kurt Mehlhorn">Mehlhorn, Kurt</a>; <a href="Peter_Sanders_(computer_scientist)" title="Peter Sanders (computer scientist)">Sanders, Peter</a> (2008), "4 Hash Tables and Associative Arrays", <a rel="nofollow" class="external text" href="http://people.mpi-inf.mpg.de/~mehlhorn/ftp/Toolbox/HashTables.pdf"><i>Algorithms and Data Structures: The Basic Toolbox</i></a> <span class="cs1-format">(PDF)</span>, Springer, pp. <span class="nowrap">81–</span>98, <a rel="nofollow" class="external text" href="https://web.archive.org/web/20140802025330/http://people.mpi-inf.mpg.de/~mehlhorn/ftp/Toolbox/HashTables.pdf">archived</a> <span class="cs1-format">(PDF)</span> from the original on 2014-08-02</cite></span>
</li>
<li id="cite_note-clrs-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-clrs_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-clrs_5-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-clrs_5-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-clrs_5-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFCormenLeisersonRivestStein2001" class="citation cs2"><a href="Thomas_H._Cormen" title="Thomas H. Cormen">Cormen, Thomas H.</a>; <a href="Charles_E._Leiserson" title="Charles E. Leiserson">Leiserson, Charles E.</a>; <a href="Ron_Rivest" title="Ron Rivest">Rivest, Ronald L.</a>; <a href="Clifford_Stein" title="Clifford Stein">Stein, Clifford</a> (2001), "11 Hash Tables", <i><a href="Introduction_to_Algorithms" title="Introduction to Algorithms">Introduction to Algorithms</a></i> (2nd ed.), <a href="MIT_Press" title="MIT Press">MIT Press</a> and <a href="McGraw-Hill" class="mw-redirect" title="McGraw-Hill">McGraw-Hill</a>, pp. <span class="nowrap">221–</span>252, <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0-262-03293-7</bdi></cite>.</span>
</li>
<li id="cite_note-dietzfelbinger-6"><span class="mw-cite-backlink">^ <a href="#cite_ref-dietzfelbinger_6-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-dietzfelbinger_6-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text">Dietzfelbinger, M., Karlin, A., Mehlhorn, K., Meyer auf der Heide, F., Rohnert, H., and Tarjan, R. E. 1994.
<a rel="nofollow" class="external text" href="http://www.arl.wustl.edu/~sailesh/download_files/Limited_Edition/hash/Dynamic%20Perfect%20Hashing-%20Upper%20and%20Lower%20Bounds.pdf">"Dynamic Perfect Hashing: Upper and Lower Bounds"</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20160304094014/http://www.arl.wustl.edu/~sailesh/download_files/Limited_Edition/hash/Dynamic%20Perfect%20Hashing-%20Upper%20and%20Lower%20Bounds.pdf">Archived</a> 2016-03-04 at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a>.
SIAM J. Comput. 23, 4 (Aug. 1994), 738-761.
<a rel="nofollow" class="external free" href="http://portal.acm.org/citation.cfm?id=182370">http://portal.acm.org/citation.cfm?id=182370</a>
<a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1137%2FS0097539791194094">10.1137/S0097539791194094</a></span>
</li>
<li id="cite_note-Michie1968-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-Michie1968_7-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFMichie1968" class="citation journal cs1">Michie, Donald (1968). <a rel="nofollow" class="external text" href="https://www.cs.utexas.edu/users/hunt/research/hash-cons/hash-cons-papers/michie-memo-nature-1968.pdf">"'Memo' Functions and Machine Learning"</a> <span class="cs1-format">(PDF)</span>. <i><a href="Nature_(journal)" title="Nature (journal)">Nature</a></i>. <b>218</b> (5136): <span class="nowrap">19–</span>22. <a href="Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/1968Natur.218...19M">1968Natur.218...19M</a>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1038%2F218019a0">10.1038/218019a0</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:4265138">4265138</a>.</cite></span>
</li>
<li id="cite_note-decorator-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-decorator_8-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFGoodrichTamassia2006">Goodrich & Tamassia (2006)</a>, pp. 597–599.</span>
</li>
<li id="cite_note-Black-9"><span class="mw-cite-backlink">^ <a href="#cite_ref-Black_9-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Black_9-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFBlackStewart2020" class="citation web cs1">Black, Paul E.; Stewart, Rob (2 November 2020). <a rel="nofollow" class="external text" href="https://xlinux.nist.gov/dads/HTML/dictionary.html">"dictionary"</a>. <i>Dictionary of Algorithms and Data Structures</i><span class="reference-accessdate">. Retrieved <span class="nowrap">26 January</span> 2022</span>.</cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><a href="#CITEREFGoodrichTamassia2006">Goodrich & Tamassia (2006)</a>, pp. 389–397.</span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.faqs.org/faqs/lisp-faq/part2/section-2.html">"When should I use a hash table instead of an association list?"</a>. lisp-faq/part2. 1996-02-20.</cite></span>
</li>
<li id="cite_note-fklm-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-fklm_12-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKlammerMazzolini2006" class="citation cs2">Klammer, F.; Mazzolini, L. (2006), "Pathfinders for associative maps", <i>Ext. Abstracts GIS-l 2006</i>, GIS-I, pp. <span class="nowrap">71–</span>74</cite>.</span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text">
Joel Adams and Larry Nyhoff.
<a rel="nofollow" class="external text" href="http://cs.calvin.edu/books/c++/intro/3e/WebItems/Ch15-Web/STL-Trees.pdf">"Trees in STL"</a>.
Quote:
"The Standard Template library ... some of its containers -- the set<T>, map<T1, T2>, multiset<T>, and multimap<T1, T2> templates -- are generally built using a special kind of <i>self-balancing binary search tree</i> called a <i>red–black tree</i>."</span>
</li>
<li id="cite_note-knuth-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-knuth_14-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKnuth1998" class="citation book cs1 cs1-prop-long-vol"><a href="Donald_Knuth" title="Donald Knuth">Knuth, Donald</a> (1998). <i>The Art of Computer Programming</i>. Vol. 3: <i>Sorting and Searching</i> (2nd ed.). Addison-Wesley. pp. <span class="nowrap">513–</span>558. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0-201-89685-0</bdi>.</cite></span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite id="CITEREFProbst2010" class="citation web cs1">Probst, Mark (2010-04-30). <a rel="nofollow" class="external text" href="https://schani.wordpress.com/2010/04/30/linear-vs-binary-search/">"Linear vs Binary Search"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2016-11-20</span></span>.</cite></span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><cite id="CITEREFAlvarezRichterChenDittrich2015" class="citation book cs1">Alvarez, Victor; Richter, Stefan; Chen, Xiao; Dittrich, Jens (April 2015). "A comparison of adaptive radix trees and hash tables". <i>2015 IEEE 31st International Conference on Data Engineering</i>. Seoul, South Korea: IEEE. pp. <span class="nowrap">1227–</span>1238. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1109%2FICDE.2015.7113370">10.1109/ICDE.2015.7113370</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-4799-7964-6</bdi>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:17170456">17170456</a>.</cite></span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://en.cppreference.com/w/cpp/container/map">"std::map"</a>. <i>en.cppreference.com</i>.</cite></span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/dotnet/api/system.collections.specialized.ordereddictionary?view=netframework-4.8">"OrderedDictionary Class (System.Collections.Specialized)"</a>. <i>MS Docs</i>.</cite></span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/LinkedHashMap.html">"LinkedHashMap"</a>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.python.org/3.9/library/collections.html#collections.OrderedDict">"collections — Container datatypes — Python 3.9.0a3 documentation"</a>. <i>docs.python.org</i>.</cite></span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx">"Dictionary<TKey, TValue> Class"</a>. MSDN.</cite></span>
</li>
<li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Generics.Collections.TDictionary">"System.Generics.Collections.TDictionary - RAD Studio API Documentation"</a>. <i>docwiki.embarcadero.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2017-04-18</span></span>.</cite></span>
</li>
<li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://dlang.org/hash-map.html">"Associative Arrays, the D programming language"</a>. Digital Mars.</cite></span>
</li>
<li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://developer.apple.com/library/prerelease/ios/documentation/Cocoa/Conceptual/Archiving/Archiving.html#//apple_ref/doc/uid/10000047i">"Archives and Serializations Programming Guide"</a>, Apple Inc., 2012</span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1290876196">
/* start https://en.wikipedia.org/ */
.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .infobox .side-box{font-size:100%}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1237033735">
/* start https://en.wikipedia.org/ */
@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}
/* end https://en.wikipedia.org/ */
</style><div class="side-box side-box-right sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */
.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}
/* end https://en.wikipedia.org/ */
</style>
<div class="side-box-flex">
<div class="side-box-image"><span class="noviewer" typeof="mw:File"></span></div>
<div class="side-box-text plainlist">Look up <i><b><a href="https://en.wiktionary.org/wiki/associative_array" class="extiw external" title="wiktionary:associative array">associative array</a></b></i> in Wiktionary, the free dictionary.</div></div>
</div>
<ul><li><a rel="nofollow" class="external text" href="https://xlinux.nist.gov/dads/HTML/assocarray.html">NIST's Dictionary of Algorithms and Data Structures: Associative Array</a></li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Data_structures216" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div id="Data_structures216" style="font-size:114%;margin:0 4em"><a href="Data_structure" title="Data structure">Data structures</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Types</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Collection_(abstract_data_type)" title="Collection (abstract data type)">Collection</a></li>
<li><a href="Container_(abstract_data_type)" title="Container (abstract data type)">Container</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Abstract_data_type" title="Abstract data type">Abstract</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li>
<ul><li><a href="Multimap" title="Multimap">Multimap</a></li>
<li><a href="Retrieval_Data_Structure" title="Retrieval Data Structure">Retrieval Data Structure</a></li></ul></li>
<li><a href="List_(abstract_data_type)" title="List (abstract data type)">List</a></li>
<li><a href="Stack_(abstract_data_type)" title="Stack (abstract data type)">Stack</a></li>
<li><a href="Queue_(abstract_data_type)" title="Queue (abstract data type)">Queue</a>
<ul><li><a href="Double-ended_queue" title="Double-ended queue">Double-ended queue</a></li></ul></li>
<li><a href="Priority_queue" title="Priority queue">Priority queue</a>
<ul><li><a href="Double-ended_priority_queue" title="Double-ended priority queue">Double-ended priority queue</a></li></ul></li>
<li><a href="Set_(abstract_data_type)" title="Set (abstract data type)">Set</a>
<ul><li><a href="Set_(abstract_data_type)#Multiset" title="Set (abstract data type)">Multiset</a></li>
<li><a href="Disjoint-set_data_structure" title="Disjoint-set data structure">Disjoint-set</a></li></ul></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Array_(data_structure)" title="Array (data structure)">Arrays</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Bit_array" title="Bit array">Bit array</a></li>
<li><a href="Circular_buffer" title="Circular buffer">Circular buffer</a></li>
<li><a href="Dynamic_array" title="Dynamic array">Dynamic array</a></li>
<li><a href="Hash_table" title="Hash table">Hash table</a></li>
<li><a href="Hashed_array_tree" title="Hashed array tree">Hashed array tree</a></li>
<li><a href="Sparse_matrix" title="Sparse matrix">Sparse matrix</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Linked_data_structure" title="Linked data structure">Linked</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Association_list" title="Association list">Association list</a></li>
<li><a href="Linked_list" title="Linked list">Linked list</a></li>
<li><a href="Skip_list" title="Skip list">Skip list</a></li>
<li><a href="Unrolled_linked_list" title="Unrolled linked list">Unrolled linked list</a></li>
<li><a href="XOR_linked_list" title="XOR linked list">XOR linked list</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Tree_(data_structure)" class="mw-redirect" title="Tree (data structure)">Trees</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="B-tree" title="B-tree">B-tree</a></li>
<li><a href="Binary_search_tree" title="Binary search tree">Binary search tree</a>
<ul><li><a href="AA_tree" title="AA tree">AA tree</a></li>
<li><a href="AVL_tree" title="AVL tree">AVL tree</a></li>
<li><a href="Red%E2%80%93black_tree" title="Red–black tree">Red–black tree</a></li>
<li><a href="Self-balancing_binary_search_tree" title="Self-balancing binary search tree">Self-balancing tree</a></li>
<li><a href="Splay_tree" title="Splay tree">Splay tree</a></li></ul></li>
<li><a href="Heap_(data_structure)" title="Heap (data structure)">Heap</a>
<ul><li><a href="Binary_heap" title="Binary heap">Binary heap</a></li>
<li><a href="Binomial_heap" title="Binomial heap">Binomial heap</a></li>
<li><a href="Fibonacci_heap" title="Fibonacci heap">Fibonacci heap</a></li></ul></li>
<li><a href="R-tree" title="R-tree">R-tree</a>
<ul><li><a href="R*_tree" class="mw-redirect" title="R* tree">R* tree</a></li>
<li><a href="R%2B_tree" title="R+ tree">R+ tree</a></li>
<li><a href="Hilbert_R-tree" title="Hilbert R-tree">Hilbert R-tree</a></li></ul></li>
<li><a href="Trie" title="Trie">Trie</a>
<ul><li><a href="Hash_tree_(persistent_data_structure)" title="Hash tree (persistent data structure)">Hash tree</a></li></ul></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Graph_(abstract_data_type)" title="Graph (abstract data type)">Graphs</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Binary_decision_diagram" title="Binary decision diagram">Binary decision diagram</a></li>
<li><a href="Directed_acyclic_graph" title="Directed acyclic graph">Directed acyclic graph</a></li>
<li><a href="Deterministic_acyclic_finite_state_automaton" title="Deterministic acyclic finite state automaton">Directed acyclic word graph</a></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><a href="List_of_data_structures" title="List of data structures">List of data structures</a></li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox" aria-labelledby="Data_types177" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Data_types177" style="font-size:114%;margin:0 4em"><a href="Data_type" title="Data type">Data types</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Units_of_information" title="Units of information">Uninterpreted</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Bit" title="Bit">Bit</a></li>
<li><a href="Byte" title="Byte">Byte</a></li>
<li><a href="Ternary_numeral_system" title="Ternary numeral system">Trit</a></li>
<li><a href="Ternary_numeral_system#Tryte" title="Ternary numeral system">Tryte</a></li>
<li><a href="Word_(computer_architecture)" title="Word (computer architecture)">Word</a></li>
<li><a href="Bit_array" title="Bit array">Bit array</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Numeric</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Arbitrary-precision_arithmetic" title="Arbitrary-precision arithmetic">Arbitrary-precision or bignum</a></li>
<li><a href="Complex_data_type" title="Complex data type">Complex</a></li>
<li><a href="Decimal_data_type" title="Decimal data type">Decimal</a></li>
<li><a href="Fixed-point_arithmetic" title="Fixed-point arithmetic">Fixed point</a></li>
<li><a href="Block_floating_point" title="Block floating point">Block floating point</a></li>
<li><a href="Floating-point_arithmetic" title="Floating-point arithmetic">Floating point</a>
<ul><li>Reduced precision
<ul><li><a href="Minifloat" title="Minifloat">Minifloat</a></li>
<li><a href="Half-precision_floating-point_format" title="Half-precision floating-point format">Half precision</a></li>
<li><a href="Bfloat16_floating-point_format" title="Bfloat16 floating-point format">bfloat16</a></li></ul></li>
<li><a href="Single-precision_floating-point_format" title="Single-precision floating-point format">Single precision</a></li>
<li><a href="Double-precision_floating-point_format" title="Double-precision floating-point format">Double precision</a></li>
<li><a href="Quadruple-precision_floating-point_format" title="Quadruple-precision floating-point format">Quadruple precision</a></li>
<li><a href="Octuple-precision_floating-point_format" title="Octuple-precision floating-point format">Octuple precision</a></li>
<li><a href="Extended_precision" title="Extended precision">Extended precision</a>
<ul><li><a href="Long_double" title="Long double">Long double</a></li></ul></li></ul></li>
<li><a href="Integer_(computer_science)" title="Integer (computer science)">Integer</a>
<ul><li><a href="Signedness" title="Signedness">signedness</a></li></ul></li>
<li><a href="Interval_arithmetic#Implementations" title="Interval arithmetic">Interval</a></li>
<li><a href="Rational_data_type" title="Rational data type">Rational</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Pointer_(computer_programming)" title="Pointer (computer programming)">Pointer</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Memory_address" title="Memory address">Address</a>
<ul><li><a href="Physical_address" title="Physical address">physical</a></li>
<li><a href="Virtual_address_space" title="Virtual address space">virtual</a></li></ul></li>
<li><a href="Reference_(computer_science)" title="Reference (computer science)">Reference</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Plain_text" title="Plain text">Text</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Character_(computing)" title="Character (computing)">Character</a></li>
<li><a href="String_(computer_science)" title="String (computer science)">String</a>
<ul><li><a href="Null-terminated_string" title="Null-terminated string">null-terminated</a></li></ul></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Composite_data_type" title="Composite data type">Composite</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Algebraic_data_type" title="Algebraic data type">Algebraic data type</a>
<ul><li><a href="Generalized_algebraic_data_type" title="Generalized algebraic data type">generalized</a></li></ul></li>
<li><a href="Array_(data_type)" title="Array (data type)">Array</a></li>
<li><a href="Class_(computer_programming)" title="Class (computer programming)">Class</a></li>
<li><a href="Dependent_type" title="Dependent type">Dependent</a></li>
<li><a href="Intuitionistic_type_theory#Equality_type" title="Intuitionistic type theory">Equality</a></li>
<li><a href="Inductive_type" title="Inductive type">Inductive</a></li>
<li><a href="Intersection_type" title="Intersection type">Intersection</a></li>
<li><a href="List_(abstract_data_type)" title="List (abstract data type)">List</a></li>
<li><a href="Object_(computer_science)" title="Object (computer science)">Object</a>
<ul><li><a href="Metaobject" title="Metaobject">metaobject</a></li></ul></li>
<li><a href="Option_type" title="Option type">Option type</a></li>
<li><a href="Product_type" title="Product type">Product</a></li>
<li><a href="Record_(computer_science)" title="Record (computer science)">Record or Struct</a></li>
<li><a href="Refinement_type" title="Refinement type">Refinement</a></li>
<li><a href="Set_(abstract_data_type)" title="Set (abstract data type)">Set</a></li>
<li><a href="Union_type" title="Union type">Union</a>
<ul><li><a href="Tagged_union" title="Tagged union">tagged</a></li></ul></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Boolean_data_type" title="Boolean data type">Boolean</a></li>
<li><a href="Bottom_type" title="Bottom type">Bottom type</a></li>
<li><a href="Container_(abstract_data_type)" title="Container (abstract data type)">Collection</a></li>
<li><a href="Enumerated_type" title="Enumerated type">Enumerated type</a></li>
<li><a href="Exception_handling" title="Exception handling">Exception</a></li>
<li><a href="Function_type" title="Function type">Function type</a></li>
<li><a href="Opaque_data_type" title="Opaque data type">Opaque data type</a></li>
<li><a href="Recursive_data_type" title="Recursive data type">Recursive data type</a></li>
<li><a href="Semaphore_(programming)" title="Semaphore (programming)">Semaphore</a></li>
<li><a href="Stream_(computing)" title="Stream (computing)">Stream</a></li>
<li><a href="Strongly_typed_identifier" title="Strongly typed identifier">Strongly typed identifier</a></li>
<li><a href="Top_type" class="mw-redirect" title="Top type">Top type</a></li>
<li><a href="Type_class" title="Type class">Type class</a></li>
<li><a href="Empty_type" title="Empty type">Empty type</a></li>
<li><a href="Unit_type" title="Unit type">Unit type</a></li>
<li><a href="Void_type" title="Void type">Void</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Related<br>topics</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Abstract_data_type" title="Abstract data type">Abstract data type</a></li>
<li><a href="Boxing_(computer_programming)" title="Boxing (computer programming)">Boxing</a></li>
<li><a href="Data_structure" title="Data structure">Data structure</a></li>
<li><a href="Generic_programming" title="Generic programming">Generic</a></li>
<li><a href="Kind_(type_theory)" title="Kind (type theory)">Kind</a>
<ul><li><a href="Metaclass" title="Metaclass">metaclass</a></li></ul></li>
<li><a href="Parametric_polymorphism" title="Parametric polymorphism">Parametric polymorphism</a></li>
<li><a href="Primitive_data_type" title="Primitive data type">Primitive data type</a></li>
<li><a href="Interface_(object-oriented_programming)" title="Interface (object-oriented programming)">Interface</a></li>
<li><a href="Subtyping" title="Subtyping">Subtyping</a></li>
<li><a href="Type_constructor" title="Type constructor">Type constructor</a></li>
<li><a href="Type_conversion" title="Type conversion">Type conversion</a></li>
<li><a href="Type_system" title="Type system">Type system</a></li>
<li><a href="Type_theory" title="Type theory">Type theory</a></li>
<li><a href="Variable_(computer_science)" title="Variable (computer science)">Variable</a></li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-08-06" href="https://en.wikipedia.org/wiki/?title=Associative_array&oldid=1304503019">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>